#ifndef _INDEX_MANAGER_H_
#define _INDEX_MANAGER_H_
#include <string>
#include <set>
#include <map>
#include "UserCommand.h"
#include "indextable.h"

class IndexManager{
public:
	IndexManager(std::shared_ptr<BufferManager> buffer_manager);
	~IndexManager();
	void dropTable(std::string table_name);
	void createIndex(std::string table_name, Attribute attr, std::string index_name);
	void insertUpdate(std::string table_name, Attribute attr, int line, std::string data);
	void deleteUpdate(std::string table_name, Attribute attr, int line, std::string data);
	void dropIndex(std::string table_name, std::string index_name);
	std::set<int> selete(std::string table_name, Condition condition);
private:
	std::shared_ptr<BufferManager> buffer_manager;
	
	std::map<std::string, IndexTable*> table_map;
};

#endif